package com.changgou.user.feign;

import com.changgou.entity.Result;
import com.changgou.user.pojo.Address;
import com.changgou.user.pojo.Collect;
import com.changgou.user.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "user")
public interface UserFeign {

    @GetMapping("/user/load/{username}")
    public User findUserInfo(@PathVariable("username") String username);

    @GetMapping("/collect/save/{id}/{username}")
    public int save(@PathVariable("id") String id, @PathVariable("username") String username);

    @GetMapping("/address/list")
    public Result<List<Address>> list();

    @GetMapping("/collect/usernameBySkuId")
    public Result usernameBySkuId();

    @RequestMapping("/footprint/usernameBySkuId2")
    public Result usernameBySkuId2();

    @GetMapping("/footprint/save2/{skuId}/{username}")
    public void save2(@PathVariable("skuId") String skuId,@PathVariable("username") String username);


}
